1. Field of the Invention
The present invention relates to an image processing apparatus, image processing method, program and imaging apparatus.
2. Description of the Related Art
In recent years, there have been widely used apparatuses having an imaging function of imaging still images and/or animations such as digital still camera, digital video camera including Handycam whose trademark the present applicant has, and cell phone having a digital camera function. Moreover, an imaging function is provided in a portable apparatus such as cell phone so that users often perform imaging. Since the user which uses an apparatus like the above to perform imaging is not a professional cameraman, a photographic subject may be imaged to be tilted relative to the horizontal direction due to, for example, camera shake or the like. In the above case, in an image obtained by the imaging, a photographic subject is tilted relative to the horizontal direction of the image.
There has been developed a technique for obtaining a horizontally-maintained photographed image without a tilt sensor for detecting a tilt. For example, there is described in Japanese Unexamined Patent Application Publication No. 2007-173966 a technique for extracting a straight line from a photographic subject within the frame to derive an angle relative to the horizontal direction and correcting a tilt of the image based on the derived angle to obtain a horizontally-maintained photographed image.